package BC53_计算一元二次方程;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            float a = sc.nextFloat();
            float b = sc.nextFloat();
            float c = sc.nextFloat();
            double judge = b * b - 4 * a * c;
            if (a == 0){
                System.out.println("Not quadratic equation");
            }else {
                if (judge == 0){
                    double x = (-b - Math.sqrt(judge)) / (2 * a);
                    System.out.printf("x1=x2=%.2f", x);
                    System.out.println();
                }else if (judge > 0){
                    double x1 = (-b + Math.sqrt(judge)) / (2 * a);
                    double x2 = (-b - Math.sqrt(judge)) / (2 * a);
                    System.out.printf("x1=%.2f;x2=%.2f", x2, x1);
                    System.out.println();
                }else {
                    double realNum = -b / (2 * a);
                    double imaNum = Math.sqrt(-judge) / (2 * a);
                    System.out.printf("x1=%.2f-%.2fi;x2=x1=%.2f+%.2fi", realNum, imaNum, realNum, imaNum);
                    System.out.println();
                }
            }
        }
    }
}
